﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MyVideoPlayer.Converters
{
    public class UrlToBoolTipCovnerter : ValueConverterBase
    {
        public override object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if (value is Uri isUrl)
                return isUrl == null ? false : "true";
            else if (value is int v)
            {
                return v == 0 ? false : "true";
            }
            return false;
        }

        public override object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
